package com.hc.model.code02.test3;

/**
 * @version v1.0
 * @ClassName: Singleton
 * @Description: 锁检查方式
 * @Author: HC
 */
public class Singleton {

    private Singleton() {}

    private static Singleton instances;

    public static synchronized Singleton getInstance() {
        if (instances == null) {
            instances = new Singleton();
        }
        return instances;
    }
}
